﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MoneyBookerDB;

namespace Site {
	public partial class _Default : System.Web.UI.Page {
		protected void Page_Load(object sender, EventArgs e) {

			pnlBanks.Visible = false;
			pnlAccounts.Visible = false;
			pnlTransfers.Visible = false;

			string remIp = Request.UserHostAddress;
			lblTitle.Text = remIp;

			//if (Request.IsLocal || remIp == "178.119.54.245") {
			//    int id = 0;
			//    int.TryParse(Request.QueryString["id"], out id);

			//    using (MoneyDBEntity db = new MoneyDBEntity()) {

			//        switch (Request.QueryString["page"]) {
			//            case "account":
			//                pnlAccounts.Visible = true;
			//                pnlAccounts.DataSource = db.Accounts.Where(ac => ac.bankId == id);
			//                pnlAccounts.DataBind();
			//                break;
			//            case "transfer":
			//                pnlTransfers.Visible = true;
			//                pnlTransfers.DataSource = db.Transfers.Where(tr => tr.to == id || tr.from == id);
			//                pnlTransfers.DataBind();
			//                break;
			//            default:
			//                pnlBanks.Visible = true;
			//                pnlBanks.DataSource = db.Banks;
			//                pnlBanks.DataBind();
			//                break;
			//        }
			//    }
			//} else {
			//    lblTitle.Text += "<p>Verkeerde PC</p>";
			//}
		}
	}
}
